package com.rongc.client.freight.business.carrier.model;

import android.content.Context;
import android.os.Bundle;

import com.rongc.client.core.utils.ActivityUtils;
import com.rongc.client.freight.business.carrier.view.activity.ConveyanceWaybillActivity;
import com.rongc.client.freight.business.carrier.view.activity.ConveyanceWaybillDetailActivity;
import com.rongc.client.freight.business.supply.model.SupplyBean;

import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.CANEL_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.COMPLATE_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.DTH_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.DZF_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.HD_TYPE;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.JDZ_TYPE;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.PD_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.ROAD_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.SH_STATUS;
import static com.rongc.client.freight.business.supply.model.SupplyDic.StatusType.TH_TYPE;

/**
 * Created by Bruce on 2017/7/6.
 */
public class ConveyanceDic {
    /**
     * 返回值类型
     */
    public final static class ResultType {
        /** 车辆 */
        public static final int CAR_TYPE = 11;
        /** 出发地 */
        public static final int DEPARTURE_TYPE = 12;
        /** 目的地 */
        public static final int DESTINATION_TYPE = 13;
    }

    public static void jumpActivity(Context context, int position, SupplyBean data){
        switch (position){
            case PD_STATUS:
                Bundle bundle = new Bundle();
                bundle.putString("data",data.getId());
                ActivityUtils.startActivity(context,ConveyanceWaybillActivity.class,bundle);
                break;
            case JDZ_TYPE:
            case DZF_STATUS:
                bundle = new Bundle();
                bundle.putString("data",data.getId());
                ActivityUtils.startActivity(context,ConveyanceWaybillDetailActivity.class,bundle);
                break;
            case DTH_STATUS:
            case ROAD_STATUS:
            case SH_STATUS:
            case COMPLATE_STATUS:
            case CANEL_STATUS:
            case TH_TYPE:
            case HD_TYPE:
                ActivityUtils.toast("jump waybill");
                break;
        }
    }
}
